package com.snk.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

@TableName("tb_cart")
@Data
@Accessors(chain = true)
public class Cart extends BasePojo{

    @TableId(type = IdType.AUTO)
    private Long id;            //购物车主键
    private Long userId;        //用户ID
    private Long itemId;        //商品ID
    private String itemTitle;   //商品标题信息
    private String itemImage;   //商品图片
    private Long  itemPrice;    //商品价格
    private Integer num;        //商品数量

/*    create table tb_cart
            (
    id                   bigint(20) not null auto_increment,
    user_id              bigint(20),
    item_id              bigint(20),
    item_title           varchar(100),
    item_image           varchar(200),
    item_price           bigint(20) comment '单位：分',
    num                  int(10),
    created              datetime,
    updated              datetime,
    primary key (id),
    key AK_user_itemId (user_id, item_id)
);*/

}
